IRCBot::Plugin.define "kick" do
	help_string "Kicks people."
	
	def privmsg_function(user,target,message,hostmask)
		random = rand(513)
		if random == 0 then
			$ircbot.send("KICK #{target} #{user} :Bad luck; Cheese's fault.")
		end
	end
	
	def command(user,target,message,hostmask)
		kickee = message.split[0]
		message = message.sub(kickee,"").strip
#		message[0] = "" if message[0..0] == ':'
		to_be_kicked = kickee.downcase.split(',')
		if to_be_kicked.include?($config[$network]['nickname'].downcase) then
			$ircbot.send("KICK #{target} #{user} :#{message}")
		else
			$ircbot.send("KICK #{target} #{to_be_kicked.join(',')} :#{user}: #{message}")
		end
	end
end
